//
//  GS_SportsSlideTableViewCell.m
//  GoodManNews
//
//  Created by dllo on 16/1/11.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "GS_SportsSlideTableViewCell.h"
#import "Masonry.h"

@implementation GS_SportsSlideTableViewCell

- (void)dealloc
{
    [_firstV release];
    [_secondV release];
    [_thirdV release];
    [_titleL release];
    [_upL release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(self.contentView).with.offset(10);
        make.left.equalTo(self.contentView).with.offset(10);
        make.height.mas_equalTo(@35);
        make.bottom.equalTo(self.firstV.mas_top).with.offset(-10);
        make.right.equalTo(self.contentView).with.offset(-10);
        
    }];
    
    [self.firstV mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(self.contentView).with.offset(10);
        make.right.equalTo(self.secondV.mas_left).with.offset(-5);
        make.bottom.equalTo(self.upL.mas_top).with.offset(-10);
        make.width.equalTo(self.secondV);
    }];
    
    [self.secondV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.right.equalTo(self.thirdV.mas_left).with.offset(-5);
        make.bottom.equalTo(self.upL.mas_top).with.offset(-10);
        make.width.equalTo(self.thirdV);
    }];
    
    [self.thirdV mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.right.equalTo(self.contentView).with.offset(-10);
        make.bottom.equalTo(self.upL.mas_top).with.offset(-10);
        
    }];
    
    [self.upL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.contentView).with.offset(10);
        make.right.equalTo(self.contentView).with.offset(-10);
        make.bottom.equalTo(self.contentView).with.offset(-10);
        make.height.mas_equalTo(@15);
        
    }];
    
}

- (void)createSubviews
{
    self.titleL = [UILabel new];
    [self.contentView addSubview:self.titleL];
//    self.titleL.backgroundColor = [UIColor redColor];
    [_titleL release];
    
    self.firstV = [UIImageView new];
    [self.contentView addSubview:self.firstV];
//    self.firstV.backgroundColor = [UIColor redColor];
    [_firstV release];
    
    self.secondV = [UIImageView new];
    [self.contentView addSubview:self.secondV];
//    self.secondV.backgroundColor = [UIColor redColor];
    [_secondV release];
    
    self.thirdV = [UIImageView new];
    [self.contentView addSubview:self.thirdV];
//    self.thirdV.backgroundColor = [UIColor redColor];
    [_thirdV release];
    
    self.upL = [UILabel new];
    [self.contentView addSubview:self.upL];
    self.upL.font = [UIFont systemFontOfSize:10];
//    self.upL.backgroundColor = [UIColor redColor];
    [_upL release];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
